package com.rd.student.dashuju.wangbo.exercise02;

import java.util.Scanner;

public class PyramidNumber {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.print("请输入层数：");
        mothod1(scanner.nextInt());
    }

    public static void mothod1(int number) {
        for (int i = 1; i <= number; i++) {

            for (int j = i; j < number; j++) {
                System.out.print("\t");
            }

            for (int j = i; j >= 1  ; j--) {
                System.out.print(j+"\t");
            }

            for (int j = 2; j <= i ; j++) {
                System.out.print(j+"\t");
            }

            System.out.println();
        }
    }
}
